home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 2 / Amiga Tools 2.iso / tools / packer / tar / src / port.h < prev    next >
Text File  |  1995-03-09  |  929b  |  30 lines

  1. /*
  2.  * Portability declarations for public domain tar.
  3.  *
  4.  * @(#)port.h 1.3    87/11/11    Public Domain by John Gilmore, 1986
  5.  */
  6.  
  7. /*
  8.  * Everybody does wait() differently.  There seem to be no definitions
  9.  * for this in V7 (e.g. you are supposed to shift and mask things out
  10.  * using constant shifts and masks.)  So fuck 'em all -- my own non
  11.  * standard but portable macros.  Don't change to a "union wait"
  12.  * based approach -- the ordering of the elements of the struct 
  13.  * depends on the byte-sex of the machine.  Foo!
  14.  */
  15. #define    TERM_SIGNAL(status)    ((status) & 0x7F)
  16. #define TERM_COREDUMP(status)    (((status) & 0x80) != 0)
  17. #define TERM_VALUE(status)    ((status) >> 8)
  18.  
  19. #if defined(MSDOS) || defined(AMIGA)
  20. /* missing things from sys/stat.h */
  21. #define    S_ISUID        0
  22. #define    S_ISGID        0
  23. #define    S_ISVTX        0
  24.  
  25. /* device stuff */
  26. #define    makedev(ma, mi)        ((ma << 8) | mi)
  27. #define    major(dev)        (dev)
  28. #define    minor(dev)        (dev)
  29. #endif    /* MSDOS */
  30.